package com.vfa.fishing;

import com.vfa.fishing.animal.Person;

import android.app.Dialog;
import android.content.Context;
import android.view.View;
import android.view.Window;
import android.widget.ImageButton;
import android.widget.TextView;
import android.view.View.OnClickListener;

public class NextLevelDialog extends Dialog implements OnClickListener
{
	
	ImageButton btnContinue;
	ImageButton btnItem;
	TextView tVwLevel;
	Context dlgContext;
	Person boat;
	public NextLevelDialog(Context context, Person boat) {
		super(context);
		dlgContext = context;
		// TODO Auto-generated constructor stub
		requestWindowFeature(Window.FEATURE_NO_TITLE);  
		setContentView(R.layout.nextlevel);		
		btnContinue = (ImageButton)findViewById(R.id.imgBtnContinue);
		btnContinue.setOnClickListener(this);
		btnItem = (ImageButton)findViewById(R.id.imgBtnItem);
		btnItem.setOnClickListener(this);
		tVwLevel = (TextView)findViewById(R.id.tVwLevel);
		tVwLevel.setOnClickListener(this);
		this.boat = boat;
	}
	
	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		if (v == btnItem) {
    		Dialog item = new ItemDialog(dlgContext, boat);
    		item.show();
		} else if (v == btnContinue) {
			dismiss();
			GameActivity.isIncreaseLevel = true;
		}
		
	}

}
